Last updated: 2022-04-28

Checks: 6 1

Knit directory: CarolineNCC1/

This reproducible R Markdown analysis was created with workflowr (version 1.7.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


The R Markdown file has unstaged changes. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20210920) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 7f56ebf. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .DS_Store
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    data/.DS_Store
    Ignored:    data/DadosGBSAtualizadosRenomeados.rds
    Ignored:    data/DadosGBSDuplicados.rds
    Ignored:    output/.DS_Store
    Ignored:    output/CarDarwinMatrix.txt

Unstaged changes:
    Modified:   analysis/AnDis.Rmd
    Modified:   output/AllDataCCCaroline.RDS

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/AnDis.Rmd) and HTML (docs/AnDis.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd 32e6500 LucianoRogerio 2022-04-28 Removed Traits with higher % of missing data
Rmd 05dacab LucianoRogerio 2021-12-19 Update diversity analysis
html 05dacab LucianoRogerio 2021-12-19 Update diversity analysis
Rmd 9f19f12 LucianoRogerio 2021-11-22 update website
html 9f19f12 LucianoRogerio 2021-11-22 update website
Rmd 3fe13ea LucianoRogerio 2021-11-22 Improvement for the layout of the website
html 3fe13ea LucianoRogerio 2021-11-22 Improvement for the layout of the website
Rmd 3ecd450 LucianoRogerio 2021-11-08 Final graphs for Descritive analysis
html 3ecd450 LucianoRogerio 2021-11-08 Final graphs for Descritive analysis
Rmd a5ffd57 LucianoRogerio 2021-11-08 Final graphs for Descritive analysis
html a5ffd57 LucianoRogerio 2021-11-08 Final graphs for Descritive analysis
Rmd 15bf4bb LucianoRogerio 2021-10-25 Fix and add link for the html pages
html 15bf4bb LucianoRogerio 2021-10-25 Fix and add link for the html pages
html 1fc7d3a LucianoRogerio 2021-10-25 Build site.
Rmd e880482 LucianoRogerio 2021-10-25 First Boxplot Graphs and Html pages

Boxplot de coleções nucleares - Características Quantitativas

Obter Dados Fenotípicos

Coleções nucleares - Dados Fenotipicos

suppressMessages(library(tidyverse)); suppressMessages(library(here)); suppressMessages(library(reshape2))
suppressMessages(library(reactable))

Method1 <- read.table(here::here("output", "CCPhenData", "DadosCCPheno1.CSV"), header = T,
                      sep = ";", dec = ".",
                      colClasses = c(rep("character", times = 31),
                                    rep("numeric", times = 3),
                                    "character",
                                    rep("numeric", times = 16)))


Method2 <- read.table(here::here("output", "CCPhenData", "DadosCCPheno2.CSV"), header = T,
                      sep = ";", dec = ".",
                      colClasses = c(rep("character", times = 31),
                                    rep("numeric", times = 3),
                                    "character",
                                    rep("numeric", times = 16)))


Method3 <- read.table(here::here("output", "CCPhenData", "DadosCCPheno3.CSV"), header = T,
                      sep = ";", dec = ".",
                      colClasses = c(rep("character", times = 31),
                                    rep("numeric", times = 3),
                                    "character",
                                    rep("numeric", times = 16)))

Coleções Nucleares - dados Moleculares

Method4 <- read.table(here::here("output", "CCGenData", "DadosCCGeno1.CSV"), header = T, 
                      sep = ";", dec = ".",
                      colClasses = c(rep("character", times = 31),
                                    rep("numeric", times = 3),
                                    "character",
                                    rep("numeric", times = 16)))


Method5 <- read.table(here::here("output", "CCGenData", "DadosCCGeno2.CSV"), header = T, 
                      sep = ";", dec = ".",
                      colClasses = c(rep("character", times = 31),
                                    rep("numeric", times = 3),
                                    "character",
                                    rep("numeric", times = 16)))


Method6 <- read.table(here::here("output", "CCGenData", "DadosCCGeno3.CSV"), header = T, 
                      sep = ";", dec = ".",
                      colClasses = c(rep("character", times = 31),
                                    rep("numeric", times = 3),
                                    "character",
                                    rep("numeric", times = 16)))

Method7 <- read.table(here::here("output", "CCGenData", "DadosCCGeno4.CSV"), header = T,
                      sep = ";", dec = ".",
                      colClasses = c(rep("character", times = 31),
                                    rep("numeric", times = 3),
                                    "character",
                                    rep("numeric", times = 16)))


Method8 <- read.table(here::here("output", "CCGenData", "DadosCCGeno5.CSV"), header = T,
                      sep = ";", dec = ".",
                      colClasses = c(rep("character", times = 31),
                                    rep("numeric", times = 3),
                                    "character",
                                    rep("numeric", times = 16)))


Method9 <- read.table(here::here("output", "CCGenData", "DadosCCGeno6.CSV"), header = T,
                      sep = ";", dec = ".",
                      colClasses = c(rep("character", times = 31),
                                    rep("numeric", times = 3),
                                    "character",
                                    rep("numeric", times = 16)))

Method10 <- read.table(here::here("output", "CCGenData", "DadosCCGeno7.CSV"), header = T,
                       sep = ";", dec = ".",
                       colClasses = c(rep("character", times = 31),
                                    rep("numeric", times = 3),
                                    "character",
                                    rep("numeric", times = 16)))


Method11 <- read.table(here::here("output", "CCGenData", "DadosCCGeno8.CSV"), header = T,
                       sep = ";", dec = ".",
                      colClasses = c(rep("character", times = 31),
                                    rep("numeric", times = 3),
                                    "character",
                                    rep("numeric", times = 16)))

Method12 <- read.table(here::here("output", "CCGenData", "DadosCCGeno9.CSV"), header = T,
                       sep = ";", dec = ".",
                       colClasses = c(rep("character", times = 31),
                                    rep("numeric", times = 3),
                                    "character",
                                    rep("numeric", times = 16)))

Banco de Germoplasma de Mandioca da EMBRAPA Mandioca

AllBAG <- readRDS(file = here::here("output", "DataSelPreparedCar.rds"))

Adicionar informações do Método e tipo de dados utilizados na seleção da Coleção Nuclear

AllBAG$Data <- rep("BAG", times = nrow(AllBAG))
AllBAG$Method <- rep("BAG", times = nrow(AllBAG))

Method1$Data <- rep("Pheno", times = nrow(Method1))
Method1$Method <- rep("GW/CH", times = nrow(Method1))

Method2$Data <- rep("Pheno", times = nrow(Method2))
Method2$Method <- rep("CH", times = nrow(Method2))

Method3$Data <- rep("Pheno", times = nrow(Method3))
Method3$Method <- rep("GW/MLST", times = nrow(Method3))

Method4$Data <- rep("Geno", times = nrow(Method4))
Method4$Method <- rep("MR/SH", times = nrow(Method4))

Method5$Data <- rep("Geno", times = nrow(Method5))
Method5$Method <- rep("CE/SH", times = nrow(Method5))

Method6$Data <- rep("Geno", times = nrow(Method6))
Method6$Method <- rep("MR/EH", times = nrow(Method6))

Method7$Data <- rep("Geno", times = nrow(Method7))
Method7$Method <- rep("CE/EH", times = nrow(Method7))

Method8$Data <- rep("Geno", times = nrow(Method8))
Method8$Method <- rep("MR/AC", times = nrow(Method8))

Method9$Data <- rep("Geno", times = nrow(Method9))
Method9$Method <- rep("CE/AC", times = nrow(Method9))

Method10$Data <- rep("Geno", times = nrow(Method10))
Method10$Method <- rep("AM/MLST", times = nrow(Method10))

Method11$Data <- rep("Geno", times = nrow(Method11))
Method11$Method <- rep("MR/MLST", times = nrow(Method11))

Method12$Data <- rep("Geno", times = nrow(Method12))
Method12$Method <- rep("CE/MLST", times = nrow(Method12))

Juntar todos os Dados das coleções nucleares e do BAG

Alldataset <- rbind(AllBAG, Method1, Method2, Method3,
                    Method4, Method5, Method6,
                    Method7, Method8, Method9,
                    Method10, Method11, Method12)

saveRDS(Alldataset, here::here("output", "AllDataCCCaroline.RDS"))

Preparar o data frame para fazer os boxplots

QualityTrait <- colnames(Alldataset)[sapply(X = Alldataset, class) == "character"] %>% 
  setdiff(., c("Acessos", "Data", "Method"))

AlldataSetQuant <- Alldataset %>% select(-all_of(QualityTrait))
AlldataSetQuali <- Alldataset %>% select(Acessos, all_of(QualityTrait), Data, Method)

AlldataSetQuant2 <- melt(AlldataSetQuant, id.vars = c("Acessos", "Data", "Method"),
       variable.name = "Trait", value.name = "Value")

Table 1. Formato da entrado do objeto para realizar o boxplot

AlldataSetQuant2$Data <- factor(AlldataSetQuant2$Data,
                                levels = c("BAG", "Pheno", "Geno"), ordered = T)
AlldataSetQuant2$Method <- factor(AlldataSetQuant2$Method,
                                levels = c("BAG", "GW/CH", "GW/MLST", "CH",
                                           "MR/SH", "MR/EH", "MR/AC", "MR/MLST",
                                           "CE/SH", "CE/EH", "CE/AC", "CE/MLST",
                                           "AM/MLST"),
                                ordered = T)
Remover os outliers
filter_lims <- function(x){
  l <- boxplot.stats(x)$stats[1]
  u <- boxplot.stats(x)$stats[5]

  for (i in 1:length(x)){
    x[i] <- ifelse(x[i]>l & x[i]<u, x[i], NA)
  }
  return(x)
}


AlldataSetQuant3 <- AlldataSetQuant2 %>% group_by(Trait, Method) %>%
  mutate(Value2 = filter_lims(Value))

Plotar o boxplot por conjunto de caracteres

Foliar1 <- c("ComprLobulo", "LargLobulo",
             "RelComprLar", "ComprPeciolo")
Foliar2 <- c("AP", "PPA", "IC", "PA")

Root <- c("EspEntreCasca", "ComprMedRzs", "DiamMedRzs", "HCNPic",
          "NR", "DRY", "DMCsg", "PTR")

Fig 1. Boxplot das características morfológicas de folha 1

Fig 2. Boxplot das características morfológicas de folha 2

Fig 3. Boxplot das características morfológicas de raiz

Barplot de coleções nucleares - Características Qualitativas

Preparar os dados qualitativos para plotar barplot
AlldataSetQuali2 <- melt(AlldataSetQuali, id.vars = c("Acessos", "Data", "Method"),
       variable.name = "Trait", value.name = "Value")


AlldataSetQuali3 <- AlldataSetQuali2 %>% filter (!is.na(Value)) %>%
  group_by(Trait, Data, Method) %>% summarise(N = table(Value, useNA = "no"),
                                              Score = names(N)) %>%
  mutate(N = as.numeric(N))
`summarise()` has grouped output by 'Trait', 'Data', 'Method'. You can override
using the `.groups` argument.
AlldataSetQuali3$Data <- factor(AlldataSetQuali3$Data,
                                levels = c("BAG", "Pheno", "Geno"), ordered = T)
AlldataSetQuali3$Method <- factor(AlldataSetQuali3$Method,
                                levels = c("BAG", "GW/CH", "GW/MLST", "CH",
                                           "MR/SH", "MR/EH", "MR/AC", "MR/MLST",
                                           "CE/SH", "CE/EH", "CE/AC", "CE/MLST",
                                           "AM/MLST"),
                                ordered = T)
AlldataSetQuali3$Score <- factor(AlldataSetQuali3$Score,
                                 levels = c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
                                            30, 40, 45, 50, 60, 70, 80, 85, 90,
                                            95, 100, 105, 110, 115, 120, 130,
                                            140, 150, 160))

Table 2. Formato da entrado do objeto para realizar o barplot

Separar as características em grupos para plotar
traitsFolha <- levels(AlldataSetQuali3$Trait)[c(1:4, 12:17, 20, 23)]
traitsCaule <- levels(AlldataSetQuali3$Trait)[c(5:8, 18:19, 21:22, 28, 32)]
traitsRaiz <- levels(AlldataSetQuali3$Trait)[c(9:11, 24:27, 29:31)]

traitsFolhaLimbo <- traitsFolha[c(1, 3:7)]
traitsFolhaPecio <- traitsFolha %>% setdiff(traitsFolhaLimbo)

traitsCauleCor <- traitsCaule[c(1:4)]
traitsCaule2 <- traitsCaule %>% setdiff(c(traitsCauleCor, "AnguloRamif"))

traitsRaizCor <- traitsRaiz[c(1:3, 8:9)]
traitsRaizFor <- traitsRaiz %>% setdiff(traitsRaizCor)

Fig 4. Barplot para cores do caule

Fig 5. Barplot para o segundo grupo de características morfológicas do caule

Fig 6. Barplot para Angulo de Ramificação das hastes do caule

Fig 7. Barplot de características morfológicas do Limbo foliar

Fig 8. Barplot de características morfológicas do pecíolo da folha

Fig 9. Barplot de cor e facilidade de destaque de epiderme da raiz

Fig 10. Barplot de características morfológicas de raiz

Back - Coleções Nucleares Genotípicas

Next - Estimativas de Diversidade genética

Home


sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Big Sur 11.6.5

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] reactable_0.2.3 reshape2_1.4.4  here_1.0.1      forcats_0.5.1  
 [5] stringr_1.4.0   dplyr_1.0.8     purrr_0.3.4     readr_2.1.2    
 [9] tidyr_1.2.0     tibble_3.1.6    ggplot2_3.3.5   tidyverse_1.3.1

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.8.3      lubridate_1.8.0   assertthat_0.2.1  rprojroot_2.0.3  
 [5] digest_0.6.29     utf8_1.2.2        reactR_0.4.4      plyr_1.8.7       
 [9] R6_2.5.1          cellranger_1.1.0  backports_1.4.1   reprex_2.0.1     
[13] evaluate_0.15     highr_0.9         httr_1.4.2        pillar_1.7.0     
[17] rlang_1.0.2       readxl_1.4.0      rstudioapi_0.13   whisker_0.4      
[21] jquerylib_0.1.4   rmarkdown_2.14    labeling_0.4.2    htmlwidgets_1.5.4
[25] munsell_0.5.0     broom_0.8.0       compiler_4.1.2    httpuv_1.6.5     
[29] modelr_0.1.8      xfun_0.30         pkgconfig_2.0.3   htmltools_0.5.2  
[33] tidyselect_1.1.2  workflowr_1.7.0   viridisLite_0.4.0 fansi_1.0.3      
[37] crayon_1.5.1      tzdb_0.3.0        dbplyr_2.1.1      withr_2.5.0      
[41] later_1.3.0       grid_4.1.2        jsonlite_1.8.0    gtable_0.3.0     
[45] lifecycle_1.0.1   DBI_1.1.2         git2r_0.30.1      magrittr_2.0.3   
[49] scales_1.2.0      cli_3.3.0         stringi_1.7.6     farver_2.1.0     
[53] fs_1.5.2          promises_1.2.0.1  xml2_1.3.3        bslib_0.3.1      
[57] ellipsis_0.3.2    generics_0.1.2    vctrs_0.4.1       tools_4.1.2      
[61] glue_1.6.2        crosstalk_1.2.0   hms_1.1.1         fastmap_1.1.0    
[65] yaml_2.3.5        colorspace_2.0-3  rvest_1.0.2       knitr_1.38       
[69] haven_2.5.0       sass_0.4.1